
#include		"ManagerGarbageCollector.h"

template<>
EncodedSoundPacket							*ManagerGarbageCollector::getClass<EncodedSoundPacket>()
{
	if (_esp.empty() != false)
	{
		EncodedSoundPacket	*tmp = _esp.back();
		_esp.pop();
		return tmp;
	}
	return NULL;
}

template<>
SoundPacket									*ManagerGarbageCollector::getClass<SoundPacket>()
{
	if (_esp.empty() != false)
	{
		SoundPacket	*tmp = _sp.back();
		_sp.pop();
		return tmp;
	}
	return NULL;		
}

template<>
void										ManagerGarbageCollector::pushClass<EncodedSoundPacket>(EncodedSoundPacket * obj)
{
	_esp.push(obj);
}

template<>
void										ManagerGarbageCollector::pushClass<SoundPacket>(SoundPacket * obj)
{
	_sp.push(obj);
}